﻿using System;
using System.Data;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;

namespace AnyOffice.general.attend.manage
{
    public partial class confirm : ModulePage
    {


        public string GetStatusName(int allow)
        {
            switch (allow)
            {
                case 0:
                    return "请假申请";

                case 3:
                    return "申请销假";
            }
            return "";
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            this.ViewState["IsMobile"] = SmsDao.IsMobile(SmsDao.SmsType.Attend).ToString().ToLower();
            DataTable table = new AttendOutDao().SelectAdmin(base.Conn);
            if (table.Rows.Count > 0)
            {
                this.rptOut.DataSource = table;
                this.rptOut.DataBind();
            }
            else
            {
                this.litOut.Text = base.ShowMessage("无外出申请审批");
            }
            DataTable table2 = new AttendLeaveDao().SelectAdmin(base.Conn);
            if (table2.Rows.Count > 0)
            {
                this.rptLeave.DataSource = table2;
                this.rptLeave.DataBind();
            }
            else
            {
                this.litLeave.Text = base.ShowMessage("无请假申请审批");
            }
            DataTable table3 = new AttendEvectionDao().SelectAdmin(base.Conn);
            if (table3.Rows.Count > 0)
            {
                this.rptEvection.DataSource = table3;
                this.rptEvection.DataBind();
            }
            else
            {
                this.litEvection.Text = base.ShowMessage("无出差申请审批");
            }
        } 

    }
}
